# -*- coding: UTF-8 -*-
'''
Created on 2011-2-1

@author: sumory
'''
from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_mainWindow(object):
    def setupUi(self, mainWindow):
        mainWindow.setObjectName(_fromUtf8("mainWindow"))
        mainWindow.resize(740, 510)
        mainWindow.setMinimumSize(QtCore.QSize(740, 510))
        mainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("MS Shell Dlg 2"))
        font.setPointSize(10)
        mainWindow.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/terminal.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        mainIco= QtGui.QIcon()
        mainIco.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/message.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        mainWindow.setWindowIcon(mainIco)
        mainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.Chinese, QtCore.QLocale.China))
        mainWindow.setTabShape(QtGui.QTabWidget.Rounded)
        mainWindow.setDockNestingEnabled(True)
        mainWindow.setDockOptions(QtGui.QMainWindow.AllowNestedDocks|QtGui.QMainWindow.AllowTabbedDocks|QtGui.QMainWindow.AnimatedDocks)
        self.centralWidget = QtGui.QWidget(mainWindow)
        self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
        
        self.stack=QtGui.QStackedWidget()
        self.stack.setFrameStyle(QtGui.QFrame.Panel|QtGui.QFrame.Raised)
        
        self.textEdit = QtGui.QTextEdit(self.centralWidget)
        self.textEdit.setGeometry(QtCore.QRect(10, 50, 720, 371))
        self.textEdit.setMinimumSize(QtCore.QSize(720, 200))
        self.textEdit.setObjectName(_fromUtf8("textEdit"))
        self.optionWidget = QtGui.QWidget(self.centralWidget)
        self.optionWidget.setGeometry(QtCore.QRect(0, 0, 741, 51))
        self.optionWidget.setMinimumSize(QtCore.QSize(730, 0))
        self.optionWidget.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.optionWidget.setObjectName(_fromUtf8("optionWidget"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.optionWidget)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.pathLineEdit = QtGui.QLineEdit(self.optionWidget)
        self.pathLineEdit.setMinimumSize(QtCore.QSize(300, 0))
        self.pathLineEdit.setObjectName(_fromUtf8("pathLineEdit"))
        self.horizontalLayout_3.addWidget(self.pathLineEdit)
        self.openEncryptDirButton = QtGui.QPushButton(self.optionWidget)
        self.openEncryptDirButton.setObjectName(_fromUtf8("openEncryptDirButton"))
        self.horizontalLayout_3.addWidget(self.openEncryptDirButton)
        self.encryptButton = QtGui.QPushButton(self.optionWidget)
        self.encryptButton.setObjectName(_fromUtf8("encryptButton"))
        self.horizontalLayout_3.addWidget(self.encryptButton)
        self.openDecryptLogButton = QtGui.QPushButton(self.optionWidget)
        self.openDecryptLogButton.setObjectName(_fromUtf8("openDecryptLogButton"))
        self.horizontalLayout_3.addWidget(self.openDecryptLogButton)
        self.decryptButton = QtGui.QPushButton(self.optionWidget)
        self.decryptButton.setObjectName(_fromUtf8("decryptButton"))
        self.horizontalLayout_3.addWidget(self.decryptButton)
        
        self.stack.addWidget(self.centralWidget)
        self.detail=Detail()
        self.stack.addWidget(self.detail)
        mainWindow.setCentralWidget(self.stack)
        
        
        
        self.menuBar = QtGui.QMenuBar(mainWindow)
        self.menuBar.setGeometry(QtCore.QRect(0, 0, 740, 23))
        self.menuBar.setObjectName(_fromUtf8("menuBar"))
        self.menuFile = QtGui.QMenu(self.menuBar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menu_Q = QtGui.QMenu(self.menuBar)
        self.menu_Q.setObjectName(_fromUtf8("menu_Q"))
        self.menu_T = QtGui.QMenu(self.menuBar)
        self.menu_T.setObjectName(_fromUtf8("menu_T"))
        self.menu = QtGui.QMenu(self.menuBar)
        self.menu.setObjectName(_fromUtf8("menu"))
        mainWindow.setMenuBar(self.menuBar)
        self.toolBar = QtGui.QToolBar(mainWindow)
        self.toolBar.setMinimumSize(QtCore.QSize(740, 0))
        self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        self.toolBar.setObjectName(_fromUtf8("toolBar"))
        mainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.statusBar = QtGui.QStatusBar(mainWindow)
        self.statusBar.setObjectName(_fromUtf8("statusBar"))
        mainWindow.setStatusBar(self.statusBar)
        
        
        
        
        self.action_Exit = QtGui.QAction(mainWindow)
        self.action_Exit.setIcon(icon)
        self.action_Exit.setObjectName(_fromUtf8("action_Exit"))
        self.action_Edit = QtGui.QAction(mainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/edit.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_Edit.setIcon(icon1)
        self.action_Edit.setObjectName(_fromUtf8("action_Edit"))
        self.action_Delete = QtGui.QAction(mainWindow)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/delete.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_Delete.setIcon(icon2)
        self.action_Delete.setObjectName(_fromUtf8("action_Delete"))
        self.action_Query = QtGui.QAction(mainWindow)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/encrypt.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_Query.setIcon(icon3)
        self.action_Query.setObjectName(_fromUtf8("action_Query"))
        self.action_Stat = QtGui.QAction(mainWindow)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/notebook.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.action_Stat.setIcon(icon4)
        self.action_Stat.setObjectName(_fromUtf8("action_Stat"))
        self.action_about = QtGui.QAction(mainWindow)
        self.action_about.setObjectName(_fromUtf8("action_about"))
        self.action_contact = QtGui.QAction(mainWindow)
        self.action_contact.setObjectName(_fromUtf8("action_contact"))
        self.menuFile.addAction(self.action_Exit)
        self.menu_Q.addAction(self.action_Query)
        self.menu_Q.addAction(self.action_Stat)
        self.menu_T.addAction(self.action_Delete)
        self.menu_T.addAction(self.action_Edit)
        self.menu.addAction(self.action_about)
        self.menu.addAction(self.action_contact)
        self.menuBar.addAction(self.menuFile.menuAction())
        self.menuBar.addAction(self.menu_Q.menuAction())
        self.menuBar.addAction(self.menu_T.menuAction())
        self.menuBar.addAction(self.menu.menuAction())
        
        self.toolBar.addAction(self.action_Query)
        self.toolBar.addAction(self.action_Stat)

        self.useStylePaletteCheckBox = QtGui.QCheckBox(_fromUtf8("使用默认风格"))
        self.useStylePaletteCheckBox.setChecked(False)
        self.useStylePaletteCheckBox.toggled.connect(self.changePalette)
        self.styleComboBox = QtGui.QComboBox()
        self.styleComboBox.addItems(QtGui.QStyleFactory.keys())
        self.styleComboBox.setCurrentIndex(5)
        self.styleComboBox.activated[str].connect(self.changeStyle)
        self.toolBar.addWidget(self.styleComboBox)
        self.toolBar.addWidget(QtGui.QLabel(_fromUtf8("  ")))
        self.toolBar.addWidget(self.useStylePaletteCheckBox)
        
        
        self.retranslateUi(mainWindow)
        QtCore.QObject.connect(self.action_Exit, QtCore.SIGNAL(_fromUtf8("triggered()")), mainWindow.closeEvent)
        QtCore.QObject.connect(self.action_about, QtCore.SIGNAL(_fromUtf8("triggered()")), mainWindow.action_about_performed)
        QtCore.QObject.connect(self.action_contact, QtCore.SIGNAL(_fromUtf8("triggered()")), mainWindow.action_contact_performed)
        
        QtCore.QObject.connect(self.openEncryptDirButton, QtCore.SIGNAL(_fromUtf8("clicked()")), mainWindow.openEncryptDir_performed)
        QtCore.QObject.connect(self.encryptButton, QtCore.SIGNAL(_fromUtf8("clicked()")), mainWindow.encryptButton_performed)
        QtCore.QObject.connect(self.openDecryptLogButton, QtCore.SIGNAL(_fromUtf8("clicked()")), mainWindow.openDecryptDir_performed)
        QtCore.QObject.connect(self.decryptButton, QtCore.SIGNAL(_fromUtf8("clicked()")), mainWindow.decryptButton_performed)
       
        QtCore.QObject.connect(self.action_Query, QtCore.SIGNAL(_fromUtf8("triggered()")),mainWindow.changeStackedWidget)#mainWindow.changeStackedWidget
        QtCore.QObject.connect(self.action_Stat, QtCore.SIGNAL(_fromUtf8("triggered()")), mainWindow.changeStackedWidget1)
        
        QtCore.QMetaObject.connectSlotsByName(mainWindow)

    def retranslateUi(self, mainWindow):
        mainWindow.setWindowTitle(QtGui.QApplication.translate("mainWindow", "QaoBa Toolkit", None, QtGui.QApplication.UnicodeUTF8))
        self.openEncryptDirButton.setText(QtGui.QApplication.translate("mainWindow", "打开加密文件夹", None, QtGui.QApplication.UnicodeUTF8))
        self.encryptButton.setText(QtGui.QApplication.translate("mainWindow", "加密", None, QtGui.QApplication.UnicodeUTF8))
        self.openDecryptLogButton.setText(QtGui.QApplication.translate("mainWindow", "打开解密日志", None, QtGui.QApplication.UnicodeUTF8))
        self.decryptButton.setText(QtGui.QApplication.translate("mainWindow", "解密", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setTitle(QtGui.QApplication.translate("mainWindow", "文件(&F)", None, QtGui.QApplication.UnicodeUTF8))
        self.menu_Q.setTitle(QtGui.QApplication.translate("mainWindow", "操作(&O)", None, QtGui.QApplication.UnicodeUTF8))
        self.menu_T.setTitle(QtGui.QApplication.translate("mainWindow", "其它(&T)", None, QtGui.QApplication.UnicodeUTF8))
        self.menu.setTitle(QtGui.QApplication.translate("mainWindow", "关于", None, QtGui.QApplication.UnicodeUTF8))
        self.toolBar.setWindowTitle(QtGui.QApplication.translate("mainWindow", "toolBar", None, QtGui.QApplication.UnicodeUTF8))
        self.statusBar.setStatusTip(QtGui.QApplication.translate("mainWindow", "Ready!", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Exit.setText(QtGui.QApplication.translate("mainWindow", "退出(&X)", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Exit.setStatusTip(QtGui.QApplication.translate("mainWindow", "退出QaoBa，快捷键:Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Exit.setShortcut(QtGui.QApplication.translate("mainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Edit.setText(QtGui.QApplication.translate("mainWindow", "编辑(&E)", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Edit.setShortcut(QtGui.QApplication.translate("mainWindow", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Delete.setText(QtGui.QApplication.translate("mainWindow", "删除(&D)", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Delete.setShortcut(QtGui.QApplication.translate("mainWindow", "Ctrl+Del", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Query.setText(QtGui.QApplication.translate("mainWindow", "加解密(&M)", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Query.setStatusTip(QtGui.QApplication.translate("mainWindow", "加解密文件，快捷键:Ctrl+F", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Query.setShortcut(QtGui.QApplication.translate("mainWindow", "Ctrl+F", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Stat.setText(QtGui.QApplication.translate("mainWindow", "记事本(&S)", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Stat.setStatusTip(QtGui.QApplication.translate("mainWindow", "记录信息，快捷键:Ctrl+S", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Stat.setShortcut(QtGui.QApplication.translate("mainWindow", "Ctrl+S", None, QtGui.QApplication.UnicodeUTF8))
        self.action_about.setText(QtGui.QApplication.translate("mainWindow", "关于QaoBa", None, QtGui.QApplication.UnicodeUTF8))
        self.action_contact.setText(QtGui.QApplication.translate("mainWindow", "联系作者", None, QtGui.QApplication.UnicodeUTF8))


class Detail(QtGui.QWidget):
    def __init__(self,parent=None):
        super(Detail,self).__init__(parent)
        label1=QtGui.QLabel(_fromUtf8("国家/地区:"))
        label2=QtGui.QLabel(_fromUtf8("省份:"))
        label3=QtGui.QLabel(_fromUtf8("城市:"))
        label4=QtGui.QLabel(_fromUtf8("个人说明:"))

        countryComboBox=QtGui.QComboBox()
        countryComboBox.addItem(_fromUtf8("中华人民共和国"))
        countryComboBox.addItem(_fromUtf8("香港"))
        countryComboBox.addItem(_fromUtf8("台北"))
        countryComboBox.addItem(_fromUtf8("澳门"))
        provinceComboBox=QtGui.QComboBox()
        provinceComboBox.addItem(_fromUtf8("安徽省"))
        provinceComboBox.addItem(_fromUtf8("北京市"))
        provinceComboBox.addItem(_fromUtf8("江苏省"))
        cityLineEdit=QtGui.QLineEdit()
        remarkTextEdit=QtGui.QTextEdit()

        layout=QtGui.QGridLayout(self)
        layout.addWidget(label1,0,0)
        layout.addWidget(countryComboBox,0,1)
        layout.addWidget(label2,1,0)
        layout.addWidget(provinceComboBox,1,1)
        layout.addWidget(label3,2,0)
        layout.addWidget(cityLineEdit,2,1)
        layout.addWidget(label4,3,0)
        layout.addWidget(remarkTextEdit,3,1)

from main import qaoba_rc